(()=>{
const MyPlugin=function(Vue,options){
  Vue.myGlobalMethod = function(){
    console.log('myGlobalMethod()')
  }
}
//指定全局
Vue.directive('my-directive',(el,binding)=>{
  el.innerHTML =binding.value+'----'
})
// 实列定义方法
Vue.prototype.$myMethod=function(){
 console.log('vm $myMethod()')
}
  window.MyPlugin=MyPlugin
})()